using System.Threading.Tasks;
using Xamarin.Essentials;

namespace DailyPoetryX.Services.Implementations {
    /// <summary>
    /// 浏览器服务。
    /// </summary>
    public class BrowserService : IBrowserService {
        /// <summary>
        /// 打开网址。
        /// </summary>
        /// <param name="url">要打开的网址。</param>
        public async Task OpenAsync(string url) =>
            await Browser.OpenAsync(url, BrowserLaunchMode.SystemPreferred);
    }
}